<html>
<head><meta charset="utf-8"><title>Running miri in CI/CD · miri · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/index.html">miri</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Running.20miri.20in.20CI.2FCD.html">Running miri in CI/CD</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="239316796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Running%20miri%20in%20CI/CD/near/239316796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lander Brandt <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Running.20miri.20in.20CI.2FCD.html#239316796">(May 18 2021 at 20:02)</a>:</h4>
<p>Does anyone run Miri on tests in CI/CD pipelines? If so, how do you set it up? I'd like to enable it and fail on real violations but ignore panics relating to unsupported syscalls/features.</p>



<a name="239319937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Running%20miri%20in%20CI/CD/near/239319937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Running.20miri.20in.20CI.2FCD.html#239319937">(May 18 2021 at 20:24)</a>:</h4>
<p>You can use <code>cfg(miri)</code> to disable it when it would hit unsupported syscalls</p>



<a name="239320587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Running%20miri%20in%20CI/CD/near/239320587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lander Brandt <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Running.20miri.20in.20CI.2FCD.html#239320587">(May 18 2021 at 20:29)</a>:</h4>
<p>While this works, I'm not sure it's the correct solution. If something changes over time to not perform an FFI call, the test would be skipped and you'd need to consciously think about including the test again. I was hoping for a <code>-Zmiri-ignore-ffi-failures</code> something like that to just skip those types of tests.</p>



<a name="239320605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Running%20miri%20in%20CI/CD/near/239320605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lander Brandt <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Running.20miri.20in.20CI.2FCD.html#239320605">(May 18 2021 at 20:29)</a>:</h4>
<p>maybe i'll file an issue and see how hard it'd be to implement myself...</p>



<a name="239325051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Running%20miri%20in%20CI/CD/near/239325051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lander Brandt <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Running.20miri.20in.20CI.2FCD.html#239325051">(May 18 2021 at 20:59)</a>:</h4>
<p>Issue filed here: <a href="https://github.com/rust-lang/miri/issues/1807">https://github.com/rust-lang/miri/issues/1807</a></p>



<a name="239855711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Running%20miri%20in%20CI/CD/near/239855711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Running.20miri.20in.20CI.2FCD.html#239855711">(May 22 2021 at 08:17)</a>:</h4>
<blockquote>
<p>If something changes over time to not perform an FFI call, the test would be skipped and you'd need to consciously think about including the test again.</p>
</blockquote>
<p>OTOH, if tests would get "silently" enabled when new FFI calls are supported, your CI might start failing without any change on your side.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>